package com.rocky.study.myenum;

// Singleton with static factory
public class EnumFactory {

    private static final EnumFactory INSTANCE = new EnumFactory();

    private EnumFactory() {}

    public static EnumFactory getInstance() {
        return INSTANCE;
    }

    public void leaveTheBuilding() {
        System.out.println("who a baby,I'm outta here!");
    }

    public static void main(String[] args) {
        EnumFactory enumFactory = EnumFactory.INSTANCE;
        enumFactory.leaveTheBuilding();
    }
}
